
<div class="form-flag col-md-1" style="padding-right:0;">
   <?php foreach ($languages AS $lang => $language) : ?>
   <a href="javascript:;" data-lang="<?php echo $lang; ?>" class="lang_flag<?php echo (($lang == $this->session->userdata('lang')) ? ' current_lang' : ''); ?>" style="display:<?php echo ($lang == $this->session->userdata('lang')) ? 'block' : 'none'; ?>;" title="<?php echo $language['lang'] ?>"><img src="<?php echo base_url('webroot/img/flag/'. $lang .'.png'); ?>" alt="<?php echo $lang; ?>" /></a>
   <?php endforeach; ?>
</div> <!-- /flag -->